package org.lwj.Intercepts.crypt.impl;


import org.lwj.Intercepts.crypt.ICrypt;
import org.lwj.common.utils.AESUtil;

public class AESCryptImpl implements ICrypt {

    @Override
    public String encrypt(String plain) {
        try {
            return AESUtil.encrypt(plain);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return plain;
    }

    @Override
    public String decrypt(String cipher) {
        try {
            return AESUtil.decrypt(cipher);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return cipher;
    }
}
